<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户登录</title>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'> </script>
    <script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'> </script>
    <script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/loginForm.js'></script>

<script type="text/javascript">

function loginServer(){

	var usernameValue = dwr.util.getValue("username");

	var passwordValue = dwr.util.getValue("password");
	
  	loginForm.loginIn(usernameValue,passwordValue, function(data) {
  	
  		if(data=="passed"){
  		
	 		window.location="server.jsp";
  		
  		}else{
  		
	 		dwr.util.setValue("msg",data);

  		}


  	});

}

</script>

</head>
<body>
<center>
<table width="231" border="0" cellpadding="2">
  <tr>
    <td width="99"><div align="center">帐号</div></td>
    <td width="118">
	<div align="center">
      <input id="username" type="text" size="12">
    </div>
	</td>
  </tr>
  <tr>
    <td><div align="center">密码</div></td>
    <td>	<div align="center">
      <input id="password" type="password" size="12">
    </div>
	</td>
  </tr>
  <tr>
    <td colspan="2"><span id="msg"></span></td>
  </tr>
  <tr>
    <td colspan="2">
	<div align="center">
      <input type="submit" id="login" value="登 录" onClick="loginServer()">
	  &nbsp;&nbsp;&nbsp;&nbsp;
      <input type="submit" id="rebuild" value="重 填">
    </div>
	</td>
    </tr>
</table>
</center>
</body>
</html>